﻿using B.WMS.GoodsDto.Input;
using B.WMS.GoodsDto.Output;
using B.WMS.StandardReturn;
using B.WMS.WMSEntities.GoodsEntities;
using B.WMS.WMSEntities.Warehousety;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Security.Cryptography.X509Certificates;
using System.Text;
using System.Threading.Tasks;
using Volo.Abp.Application.Services;

namespace B.WMS.Good
{
    public interface IGoodsAppService:IApplicationService
    {
        #region 货品列表
        /// <summary>
        /// 获取已入库货品列表
        /// </summary>
        /// <returns></returns>
        Task<List<Goods>> GetGoods();
        /// <summary>
        /// 获取货品列表
        /// </summary>
        /// <returns></returns>
        Task<ApiPaging<GoodsOutput>> GetGoodsList(string? goodsname,int? status,string? verdorid,DateTime? productiontime,DateTime? createtime,int  Pageindex=1,int  Pagesize=10);
        /// <summary>
        /// 新增货品
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<CreateGoodsInput> CreateGoods(CreateGoodsInput input);
        /// <summary>
        /// 删除货品
        /// </summary>
        /// <param name="goodscoding"></param>
        /// <returns></returns>
        Task<int> DeleteGoods(string id);
        /// <summary>
        /// 获取货品详情
        /// </summary>
        /// <param name="coding"></param>
        /// <returns></returns>
        Task<Goods> GetGoodsDto(string coding);
        /// <summary>
        /// 修改货品
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<int> UpdateGoods(CreateGoodsInput input);
        #endregion
        #region 货品单位
        /// <summary>
        /// 新增货品
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<CreateUnitDto> CreateUnit(CreateUnitInput input);
        /// <summary>
        /// 获取货品单位
        /// </summary>
        /// <returns></returns>
        Task<List<Units>> GetGoodsUnitList();
        #endregion
        #region 货品类型
        /// <summary>
        /// 新增货品类型
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<CreateGoodsTypeDto> CreateGoodsType(CreateGoodsTypeInput input);
        /// <summary>
        /// 获取货品类型
        /// </summary>
        /// <returns></returns>
        Task<List<Goodstype>> GetGoodsTypeList();
        #endregion
        #region 供应商信息
        /// <summary>
        /// 新增供应商
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<int> CreateWVendor(CreateWVendorInput input);
        /// <summary>
        /// 获取供应商列表
        /// </summary>
        /// <returns></returns>
        Task<List<WVendor>> GetWVendors();
        #endregion

        #region 调拨
        /// <summary>
        /// 新增调拨
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>
        Task<int> CreateAllocate(CreateAllocateInput input);
        /// <summary>
        /// 获取调拨列表
        /// </summary>
        /// <returns></returns>
        Task<ApiPaging<WAllocate>> GetWAllocates(string? reason, DateTime? Alldatetime, int Pageindex = 1, int Pagesize = 10);
        /// <summary>
        /// 获取货品所在仓库以及库位
        /// </summary>
        /// <param name="goodscoding"></param>
        /// <returns></returns>
        Task<WarehouseLocationOutput> GetWarehouseLocation(string goodscoding);
        #endregion
        /// <summary>
        /// 上传图片
        /// </summary>
        /// <param name="file"></param>
        /// <returns></returns>
        Task<string> Upload(IFormFile file);

        #region 预测功能
        /// <summary>
        /// 获取商品需求预测
        /// </summary>
        /// <param name="input">预测输入参数</param>
        /// <returns>预测结果</returns>
        Task<PredictionResultDto> GetGoodsPrediction(PredictionInputDto input);
        #endregion

        ///// <summary>
        ///// 导出
        ///// </summary>
        ///// <returns></returns>
        //IActionResult Export();
    }
}
